package com.tanhua.domain.mongo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * @author liuyp
 * @date 2021/01/26
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "video")
public class Video implements Serializable {
    /**主键id*/
    @Id
    private ObjectId id;
    /**自增序列*/
    @Indexed
    private Long vid;
    /**创建时间*/
    private Long created;

    /**发布人的id*/
    @Indexed
    private Long userId;
    /**发布的文字内容*/
    private String text;
    /**视频封装图片*/
    private String picUrl;
    /**视频的访问地址*/
    private String videoUrl;

    /**有多少人点赞了*/
    private Integer likeCount=0;
    /**有多少人评论了*/
    private Integer commentCount=0;
    /**有多少人喜欢了*/
    private Integer loveCount=0;
}